#ifndef TOASTDIALOG_H
#define TOASTDIALOG_H

#include "cocos-ext.h"

USING_NS_CC;
USING_NS_CC_EXT;

class ToastDialog : public CCScale9Sprite
{
public:
	/* sec = 0 mean always show */
	static ToastDialog*	create(const char* str, uint sec = 0);
public:
	bool			init(const char* str, uint sec);
	void			updateStr(const char* str);
	int			show();
	void			setDismiss(const uint sec);
protected:
	void			dismiss(float dt);
	void			removeMeCB();

protected:
	CCLabelTTF*		_strLbl;
	uint			_time;
	bool 			_showing;
};

#endif // TOASTDIALOG_H
